package com.poly;

public class PolyDetail01 {
    public static void main(String[] args) {

        //向上转型，父类的引用指向了子类
        Animal animal = new Cat();
        Object object = new Cat();
        animal.eat();

        animal.run();
        animal.sleep();
        animal.show();

        //向下转型
        Cat cat = (Cat) animal;
        cat.CathchMouse();


    }
}
